﻿using System;

using MBA.FluentExt.Converters;

using Newtonsoft.Json;

namespace MBA.FluentExt
{
	[JsonConverter(typeof(JsonConfigValueConverter))]
	public sealed class Raw
	{
		#region Constructors

		private Raw()
		{
		}

		#endregion Constructors

		#region Properties

		public bool RawValue
		{
			get; set;
		}

		public object Value
		{
			get; set;
		}

		#endregion Properties

		#region Methods

		public static Raw Function(string value)
		{
			return Object(value);
		}

		public static Raw Object(object value)
		{
			return new Raw
			{
				Value = value,
				RawValue = true,
			};
		}

		public static Raw Script(string value)
		{
			return Object(value);
		}

		#endregion Methods
	}
}